<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="${base}/resources/js/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/js/lib/jquery.1.11.3.min.js"></script>
<script type="text/javascript" src="${base}/resources/js/lib/zTree_v3/js/jquery.ztree.all-3.5.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$.ajax({
		url:"${base}/department/tree",
		success:function(result){
			$("#tree").html(result);
			initTree(treeClick);
		}
	});
});
function treeClick(treeId,node){
	var src;
	if (node.level==0){
		src = "${base}/admin/employee/list";
	}else{
		src = "${base}/admin/employee/list?deptId="+node.id;
	}
	$("[name='mainFrame']").attr("src",src);
}
</script>
</head>
<body>
<div id="tree">
</div>
<div>
<iframe src="${base}/admin/employee/list" name="mainFrame" width="80%"></iframe>
</div>
</body>
</html>